<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>MemoryPalace</title>
    <script src="websrc/js/jquery-3.2.1.js"></script>
    <script src="websrc/js/index.js"></script>
    <link rel="stylesheet" href="websrc/bootstrap-3.3.7-dist/css/bootstrap.css">
    <link rel="stylesheet" href="websrc/css/common.css">
    <link rel="stylesheet" href="websrc/css/index.css">
    <script src="websrc/plug-in/vue.js"></script>


    <link rel="stylesheet" href="websrc/css/base.css">
    <link rel="stylesheet" href="mypage/mypage.css">
    <script src="mypage/loaddata.js"></script>
    <script type="text/javascript">
      $.ajax({
	        'url': '/memorypalace/getuser.action',
	        'type': 'GET',
	        'success': function (userJSON) {
                //alert("一登陆");
                
                var userObj = JSON.parse(userJSON);
                var h = '<li><a style="padding-right:10px">'+userObj.userName+'</a></li>'+
    				'<li><a href="/memorypalace/loginout.action">退出</a></li>';
				$("#userUL").html(h);
	        },
	        'error':function (){
                //alert("未登录");
                var h = '<a href="login.jsp">登录</a>'+
				'<a href="register.jsp">注册</a>';
				$("#userUL").html(h);
	        }
	    });a 
    </script>
</head>
<body>
<div class="header clearfix">
    <nav class="navbar navbar-default">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                        data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand header-left clearfix" href="#">
                    <div class="logo">LOGO</div>
                    <div class="projectName">记忆宫殿</div>
                    <div class="projectEnglishName">Memory Palace</div>
                </a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="/memorypalace/index-login.html">个人首页<span class="sr-only">(current)</span></a></li>
                    <li><a href="/memorypalace/study/getsl.action">学习列表</a></li>
                    <li><a href="/memorypalace/mydeck.action">浏览牌组</a></li>
                    <li><a href="/memorypalace/myknowledgetree.html">知识体系</a></li>


                </ul>

                <ul id="userUL" class="nav navbar-nav navbar-right" style="padding-top: 0px;padding-right: 10px">
					
				<!-- 	<c:if test="${users.userId==null}">
							<a href="login.jsp">登录</a>
							<a href="register.jsp">注册</a>
						</c:if>
					<c:if test="${users.userId!=null}">
						<span>${users.userName}</span>
						<a href="/memorypalace/loginout">退出</a>
					</c:if>			 -->
		
				</ul>
            </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
    </nav>
</div>
<div style="margin: 0 auto;width:1198px;height: 548px">
    <div class="row">
        <div class="col-lg-6">
            <div id="todayStatu">
                <h2>今天学习情况</h2>
                <h3>连续打卡<span>0</span>天</h3>
                <h3 v-if="spendTime > 0">
                    今天在<span>{{minutesOrSeconds}}</span>分钟内学习了<span>{{studyNew+studyReview}}</span>张卡片
                </h3>
                <h3 v-else>
                    今天在<span>0</span>分钟内学习了<span>0</span>张卡片
                </h3>
                <br>

            </div>
        </div>
        <div class="col-lg-6">
            <div id="historyStatus">
                <h2>历史学习情况</h2>
                <div id="historyStatus_chart">图表加载中...</div>
            </div>
        </div>
    </div>
    <div class="row">

        <div class="col-lg-6">
            <div id="recent">
                <h2>最近学习</h2>
                <span style="color: #1abc9c;font-size: 20px" v-if="decks.length < 1">最近没有学习的牌组哦</span>
                <ul>
                    <li v-for="deck in decks">
                        <img src="websrc/img/book.png" alt="牌组" width="30" height="30">
                        <a style="font-size: 28px" :href="'/memorypalace/card.html?deckId='+deck.deckId">{{
                            deck.deckName }}</a>
                    </li>
                </ul>
            </div>
        </div>

        <div class="col-lg-6">
            <div id="defficultCard">
                <h2>学习难点</h2>
                <span style="color: #1abc9c;font-size: 20px" v-if="cardList.length < 1">还没有难点笔记哦</span>
                <ul>
                    <li v-for="card in cardList">
                        <!--<img src="../websrc/img/book.png" alt="牌组" width="30" height="30">-->
                        <a style="font-size: 22px">
                            {{ card.noteTitle }}
                            <span >
                                {{ card.cardStyleName}}
                            </span>
                        </a>
                    </li>
                </ul>
            </div>

        </div>
    </div>
    <!--<div class="row">-->
        <!--<div class="btns"  align="center" >-->
            <!--<form id="fileForm" action="/memorypalace/import/uploadtxt.action" enctype="multipart/form-data">-->
                <!--<input type="file" name="file" accept="text/csv,text/plain" style="display: none" onchange="selectedFile(this)">-->
            <!--</form>-->
            <!--<button class="btn btn-default" onclick="inputFile()">-->
                <!--导入文件-->
            <!--</button>-->
            <!--<a class="btn btn-default" href="/memorypalace/study/getsl.action">-->
                <!--开始学习-->
            <!--</a>-->
        <!--</div>-->
    <!--</div>-->
</div>
<!--插件-->
<script type="text/javascript" src="websrc/plug-in/fusioncharts/js/fusioncharts.js"></script>
<script type="text/javascript" src="websrc/plug-in/fusioncharts/js/themes/fusioncharts.theme.fint.js"></script>
</body>
</html>